<script setup>
import {toRefs} from "vue";

const props = defineProps({
  loadStatus: {
    type: String,
    default: ''
  }
})
const { loadStatus } = toRefs(props);
</script>

<template>
  <div class="load-more">
    <div v-if="loadStatus === 'loading'" class="loading"><span class="iconfont icon-loading"></span>加载中...</div>
    <div v-else-if="loadStatus === 'noMore'">没有更多了</div>
    <div v-else-if="loadStatus === 'noData'">暂无内容</div>
  </div>
</template>

<style scoped lang="scss">
  .load-more{
    display: flex;
    justify-content: center;
    font-size: 14px;
    color: #999999;
    padding: 24px 0 36px;
    .loading{
      display: flex;
      align-items: center;
      .icon-loading{
        font-size: 30px;
        color: #CCCCCC;
        animation: spin 1s linear infinite;
        margin-right: 8px;
      }
    }
  }

  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
</style>